/*
Realistic Unit Modification v4.0 Dialog 
v4.0.0.1 [ALPHA]
Concept & Development by Draper & Raps | [VRC]
*/

while{true}do{
	// waituntil {(count RUM_AHel_ServerMoveStation) > 0};

	// _grp = RUM_AHel_ServerMoveStation select 0;
	// _pos = RUM_AHel_ServerMoveStation select 1;
	// _mtype = RUM_AHel_ServerMoveStation select 2;
	// _helo = RUM_AHel_ServerMoveStation select 3;
	// _helodir = RUM_AHel_ServerMoveStation select 4;
	// _fireHeight = RUM_AHel_ServerMoveStation select 5;
	
	switch (_mtype) do {

		case "MoveClose":{

			_wpAH=_grp addWaypoint [_pos, 0];
			_wpAH setWaypointType "MOVE";
			_wpAH setWaypointSpeed "NORMAL";
			_wpAH setWaypointBehaviour "CARELESS";
			_wpAH setWaypointCombatMode "BLUE";
			_wpAH setWaypointCompletionRadius 0;
			_helo flyInheight 32;
			sleep 4.75;
			_wpAH=_grp addWaypoint [_pos, 0];
			_wpAH setWaypointType "MOVE";
			_wpAH setWaypointSpeed "LIMITED";
			_wpAH setWaypointBehaviour "CARELESS";
			_wpAH setWaypointCombatMode "BLUE";
			_wpAH setWaypointCompletionRadius 0;
			_helo flyInheight 45;
			deleteWaypoint [_grp, 0];

			// RUM_AHel_ServerMoveStation = [];
			// publicVariable "RUM_AHel_ServerMoveStation";
			
		};

		case "MoveFar":{
		
			_wpAH=_grp addWaypoint [_pos, 0];
			_wpAH setWaypointType "MOVE";
			_wpAH setWaypointSpeed "NORMAL";
			_wpAH setWaypointBehaviour "CARELESS";
			_wpAH setWaypointCombatMode "BLUE";
			_wpAH setWaypointCompletionRadius 0;
			_helo flyInheight 32;
			sleep 4.75;
			_wpAH=_grp addWaypoint [_pos, 0];
			_wpAH setWaypointType "MOVE";
			_wpAH setWaypointSpeed "NORMAL";
			_wpAH setWaypointBehaviour "CARELESS";
			_wpAH setWaypointCombatMode "BLUE";
			_wpAH setWaypointCompletionRadius 0;
			_helo flyInheight 70;
			deleteWaypoint [_grp, 0];

			// RUM_AHel_ServerMoveStation = [];
			// publicVariable "RUM_AHel_ServerMoveStation";

		};

		case "MoveSettle":{

			_wpAH=_grp addWaypoint [_pos, 0];
			_wpAH setWaypointType "MOVE";
			_wpAH setWaypointSpeed "LIMITED";
			_wpAH setWaypointBehaviour "CARELESS";
			_wpAH setWaypointCombatMode "BLUE";
			_wpAH setWaypointCompletionRadius 0;
			_helo flyInheight RUM_AHEL_flyStationHeight;
			deleteWaypoint [_grp, 0];

			// RUM_AHel_ServerMoveStation = [];
			// publicVariable "RUM_AHel_ServerMoveStation";
			
		};

		case "MoveBobUp":{

			_pilot = driver _helo;
			_grp = group _pilot;

			// [nil,nil,rHINT,"Bobbing Up - domove cmd"] call RE;
			
			_helo setdir _helodir;
			
			_helo domove getpos _helo;
			_wpAH=_grp addWaypoint [_helo, 0];
			_wpAH setWaypointType "MOVE";
			_wpAH setWaypointSpeed "LIMITED";
			_wpAH setWaypointBehaviour "CARELESS";
			_wpAH setWaypointCombatMode "BLUE";
			_wpAH setWaypointCompletionRadius 0;
			_helo flyInheight _fireHeight;

			sleep .8;
			waituntil{((getPos _helo select 2) >= (_fireHeight - 6.5))};
			deleteWaypoint [_grp, 0];
			
			// RUM_AHel_ServerMoveStation = [];
			// publicVariable "RUM_AHel_ServerMoveStation";
	
		};
		
		case "MoveBobDown":{

			_pilot = driver _helo;
			_grp = group _pilot;

			// [nil,nil,rHINT,"Bobbing Down"] call RE;
			
			_wpAH=_grp addWaypoint [_helo, 0];
			_wpAH setWaypointType "MOVE";
			_wpAH setWaypointSpeed "LIMITED";
			_wpAH setWaypointBehaviour "CARELESS";
			_wpAH setWaypointCombatMode "BLUE";
			_wpAH setWaypointCompletionRadius 0;
			_helo flyInheight RUM_AHEL_flyStationHeight;
			sleep 5;
			deleteWaypoint [_grp, 0];

			// [nil,nil,rHINT,"Lowering Down"] call RE;
			
			// RUM_AHel_ServerMoveStation = [];
			// publicVariable "RUM_AHel_ServerMoveStation";
	
		};

	};


};
if(true)exitwith{};